home *** CD-ROM | disk | FTP | other *** search
- object TestForm: TTestForm
- Left = 295
- Top = 180
- BorderIcons = [biSystemMenu, biMinimize]
- BorderStyle = bsSingle
- Caption = 'Print Preview Test'
- ClientHeight = 309
- ClientWidth = 362
- Font.Color = clBlack
- Font.Height = -13
- Font.Name = 'Arial'
- Font.Style = []
- Menu = MainMenu1
- PixelsPerInch = 96
- Position = poScreenCenter
- TextHeight = 16
- object TabbedNotebook1: TTabbedNotebook
- Left = 0
- Top = 0
- Width = 362
- Height = 309
- Align = alClient
- TabsPerRow = 4
- TabFont.Color = clBtnText
- TabFont.Height = -11
- TabFont.Name = 'MS Sans Serif'
- TabFont.Style = []
- TabOrder = 0
- object TTabPage
- Left = 5
- Top = 26
- Caption = '&Text'
- object Font1But: TButton
- Left = 35
- Top = 156
- Width = 105
- Height = 33
- Caption = '&Font'
- TabOrder = 0
- OnClick = Font1ButClick
- end
- object Preview1But: TButton
- Left = 124
- Top = 238
- Width = 105
- Height = 33
- Caption = 'Print Pre&view'
- Default = True
- TabOrder = 2
- OnClick = Preview1ButClick
- end
- object GroupBox1: TGroupBox
- Left = 176
- Top = 120
- Width = 161
- Height = 105
- Caption = 'Margins (inches)'
- TabOrder = 1
- object Label6: TLabel
- Left = 24
- Top = 19
- Width = 21
- Height = 16
- Caption = 'Left'
- end
- object Label7: TLabel
- Left = 24
- Top = 59
- Width = 21
- Height = 16
- Caption = 'Top'
- end
- object Label8: TLabel
- Left = 96
- Top = 19
- Width = 30
- Height = 16
- Caption = 'Right'
- end
- object Label9: TLabel
- Left = 96
- Top = 59
- Width = 42
- Height = 16
- Caption = 'Bottom'
- end
- object LeftMar: TMaskEdit
- Left = 24
- Top = 35
- Width = 40
- Height = 20
- EditMask = '0.0;1;_'
- MaxLength = 3
- TabOrder = 0
- Text = '1.0'
- end
- object RightMar: TMaskEdit
- Left = 96
- Top = 35
- Width = 40
- Height = 20
- EditMask = '0.0;1;_'
- MaxLength = 3
- TabOrder = 1
- Text = '1.0'
- end
- object TopMar: TMaskEdit
- Left = 24
- Top = 75
- Width = 40
- Height = 20
- EditMask = '0.0;1;_'
- MaxLength = 3
- TabOrder = 2
- Text = '1.0'
- end
- object BotMar: TMaskEdit
- Left = 96
- Top = 75
- Width = 40
- Height = 20
- EditMask = '0.0;1;_'
- MaxLength = 3
- TabOrder = 3
- Text = '1.0'
- end
- end
- object Memo1: TMemo
- Left = 16
- Top = 8
- Width = 321
- Height = 113
- BorderStyle = bsNone
- Color = clBtnFace
- Ctl3D = False
- Lines.Strings = (
- 'This example shows how to display lines of text on '
- 'one page. The Grid is turned on by default in Print '
- 'Preview. Select the "Font" button to change which font '
- 'is used, or change the margins. Note that due to '
- 'differences between screen & printer fonts, the margins '
- 'may appear different on screen. Print the page to verify '
- 'the margins are correct.')
- ParentCtl3D = False
- TabOrder = 3
- end
- end
- object TTabPage
- Left = 5
- Top = 26
- Caption = 'Ta&ble'
- object Label2: TLabel
- Left = 71
- Top = 128
- Width = 51
- Height = 16
- Caption = 'Columns'
- end
- object Label3: TLabel
- Left = 199
- Top = 128
- Width = 32
- Height = 16
- Caption = 'Rows'
- end
- object Label4: TLabel
- Left = 19
- Top = 32
- Width = 313
- Height = 65
- AutoSize = False
- Caption =
- 'This example shows how to draw a table with text and numbers in ' +
- 'the table. Zoom in to see that the outside border is thicker th' +
- 'an the inside lines. You may also change the printer orientation' +
- '.'
- WordWrap = True
- end
- object NumColEdit: TMaskEdit
- Left = 135
- Top = 124
- Width = 33
- Height = 20
- EditMask = '0;1;_'
- MaxLength = 1
- TabOrder = 0
- Text = '6'
- end
- object NumRowEdit: TMaskEdit
- Left = 247
- Top = 124
- Width = 33
- Height = 20
- EditMask = '00;1;_'
- MaxLength = 2
- TabOrder = 1
- Text = '25'
- end
- object Preview2But: TButton
- Left = 124
- Top = 238
- Width = 105
- Height = 33
- Caption = 'Print Preview'
- Default = True
- TabOrder = 4
- OnClick = Preview2ButClick
- end
- object PortraitBut: TRadioButton
- Left = 93
- Top = 176
- Width = 73
- Height = 17
- Caption = 'Portrait'
- TabOrder = 2
- end
- object LandscapeBut: TRadioButton
- Left = 173
- Top = 176
- Width = 86
- Height = 17
- Caption = 'Landscape'
- Checked = True
- TabOrder = 3
- TabStop = True
- end
- end
- object TTabPage
- Left = 5
- Top = 26
- Caption = '&Graphics'
- object Label5: TLabel
- Left = 16
- Top = 16
- Width = 321
- Height = 49
- AutoSize = False
- Caption =
- 'This example shows the use of bitmap graphics with the Print Pre' +
- 'view component. The image is streched to various sizes. You ma' +
- 'y also load another bitmap.'
- WordWrap = True
- end
- object Preview3But: TButton
- Left = 124
- Top = 238
- Width = 105
- Height = 33
- Caption = 'Print Pre&view'
- Default = True
- TabOrder = 0
- OnClick = Preview3ButClick
- end
- object Panel1: TPanel
- Left = 16
- Top = 112
- Width = 321
- Height = 113
- BevelInner = bvLowered
- BorderWidth = 2
- TabOrder = 1
- object ScrollBox1: TScrollBox
- Left = 4
- Top = 4
- Width = 313
- Height = 105
- Align = alClient
- BorderStyle = bsNone
- TabOrder = 0
- object Image1: TImage
- Left = 0
- Top = 0
- Width = 266
- Height = 200
- AutoSize = True
- Picture.Data = {<image000.bmp>}
- end
- end
- end
- object Button3: TButton
- Left = 16
- Top = 72
- Width = 105
- Height = 33
- Caption = '&Load Bitmap...'
- TabOrder = 2
- OnClick = Button3Click
- end
- end
- object TTabPage
- Left = 5
- Top = 26
- Caption = '&Multi-Page'
- object Label1: TLabel
- Left = 16
- Top = 16
- Width = 321
- Height = 65
- AutoSize = False
- Caption =
- 'The folowing example demonstrates Multi-Page documents. Look at ' +
- 'the source code for inheriting from the pagination object and ex' +
- 'tending it. Press the "Load Text" button to load your own ASCII ' +
- 'file.'
- WordWrap = True
- end
- object Label10: TLabel
- Left = 224
- Top = 112
- Width = 66
- Height = 16
- Caption = 'Start Page:'
- end
- object Preview4But: TButton
- Left = 124
- Top = 238
- Width = 105
- Height = 33
- Caption = 'Print Pre&view'
- Default = True
- TabOrder = 4
- OnClick = Preview4ButClick
- end
- object FileMemo: TMemo
- Left = 16
- Top = 136
- Width = 321
- Height = 92
- Font.Color = clBlack
- Font.Height = -11
- Font.Name = 'Courier New'
- Font.Style = []
- Lines.Strings = (
- 'unit Debug;'
- ''
- 'interface'
- ''
- 'uses'
-
- ' SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Con' +
- 'trols,'
- ' Forms, Dialogs, StdCtrls, Menus;'
- ''
- 'type'
- ' TDebugForm = class(TForm)'
- ' Memo1: TMemo;'
- ' MainMenu1: TMainMenu;'
- ' File1: TMenuItem;'
- ' StayOnTop1: TMenuItem;'
- ' N1: TMenuItem;'
- ' Exit1: TMenuItem;'
- ' Clear1: TMenuItem;'
- ' Font1: TMenuItem;'
- ' N2: TMenuItem;'
- ' FontDialog1: TFontDialog;'
- ' procedure FormCreate(Sender: TObject);'
- ' procedure Exit1Click(Sender: TObject);'
- ' procedure StayOnTop1Click(Sender: TObject);'
- ' procedure Clear1Click(Sender: TObject);'
- ' procedure Font1Click(Sender: TObject);'
- ' private'
- ' { Private declarations }'
- ' public'
- ' { Public declarations }'
- ' procedure AddLine(s: string);'
- ' end;'
- ''
- ' procedure TRACE(s: string);'
- ' procedure TRACE1(s: string; i : integer);'
- ' procedure ASSERT(b: boolean);'
- ''
- 'var'
- ' DebugForm: TDebugForm;'
- ''
- 'implementation'
- ''
- '{$R *.DFM}'
- ''
- 'const'
- ' MaxLines = 500;'
- ''
- '{$IFDEF DEBUG}'
- 'procedure TRACE(s: string);'
- 'begin'
- ' DebugForm.AddLine(s);'
- 'end;'
- '{$ELSE}'
- 'procedure TRACE(s: string);'
- 'begin'
- 'end;'
- '{$ENDIF}'
- ''
- '{$IFDEF DEBUG}'
- 'procedure TRACE1(s: string; i : integer);'
- 'begin'
- ' TRACE(s + '#39' '#39' +IntToStr(i));'
- 'end;'
- '{$ELSE}'
- 'procedure TRACE1(s: string; i : integer);'
- 'begin'
- 'end;'
- '{$ENDIF}'
- ''
- '{$IFDEF DEBUG}'
- 'procedure ASSERT(b: boolean);'
- 'begin'
- ' TRACE('#39'Assert Failed!'#39');'
- ' raise Exception.Create('#39'Assert Failed!'#39');'
- 'end;'
- '{$ELSE}'
- 'procedure ASSERT(b: boolean);'
- 'begin'
- ' TRACE('#39'Assert Failed!'#39');'
- ' raise Exception.Create('#39'Assert Failed!'#39');'
- 'end;'
- '{$ENDIF}'
- ''
- 'procedure TDebugForm.AddLine(s: string);'
- 'begin'
- ' while Memo1.Lines.Count >= MaxLines do'
- ' Memo1.Lines.Delete(0);'
- ' Memo1.Lines.Add(s);'
- 'end;'
- ''
- 'procedure TDebugForm.FormCreate(Sender: TObject);'
- 'begin'
- ' Show;'
- 'end;'
- ''
- 'procedure TDebugForm.Exit1Click(Sender: TObject);'
- 'begin'
- ' Close;'
- 'end;'
- ''
- 'procedure TDebugForm.StayOnTop1Click(Sender: TObject);'
- 'begin'
- ' StayOnTop1.Checked := NOT StayOnTop1.Checked;'
- ''
- ' if StayOnTop1.Checked then'
- ' FormStyle := fsStayOnTop'
- ' else'
- ' FormStyle := fsNormal;'
- 'end;'
- ''
- 'procedure TDebugForm.Clear1Click(Sender: TObject);'
- 'begin'
- ' Memo1.Lines.Clear;'
- 'end;'
- ''
- 'procedure TDebugForm.Font1Click(Sender: TObject);'
- 'begin'
- ' if FontDialog1.Execute then'
- ' Memo1.Font := FontDialog1.Font;'
- 'end;'
- ''
- 'begin'
- '{$IFDEF DEBUG}'
- ' DebugForm := TDebugForm.Create(NIL);'
- '{$ENDIF}'
- 'end.'
- ''
- '{ DEBUG.DFM }'
- ''
- 'object DebugForm: TDebugForm'
- ' Left = 275'
- ' Top = 127'
- ' Width = 435'
- ' Height = 300'
- ' Caption = '#39'Debug Form'#39
- ' Font.Color = clWindowText'
- ' Font.Height = -13'
- ' Font.Name = '#39'System'#39
- ' Font.Style = []'
- ' Menu = MainMenu1'
- ' PixelsPerInch = 96'
- ' OnCreate = FormCreate'
- ' TextHeight = 16'
- ' object Memo1: TMemo'
- ' Left = 0'
- ' Top = 0'
- ' Width = 427'
- ' Height = 254'
- ' Align = alClient'
- ' BorderStyle = bsNone'
- ' Font.Color = clBlack'
- ' Font.Height = -11'
- ' Font.Name = '#39'Arial'#39
- ' Font.Style = []'
- ' ParentFont = False'
- ' ScrollBars = ssVertical'
- ' TabOrder = 0'
- ' end'
- ' object MainMenu1: TMainMenu'
- ' Left = 40'
- ' Top = 48'
- ' object File1: TMenuItem'
- ' Caption = '#39'&File'#39
- ' object Clear1: TMenuItem'
- ' Caption = '#39'&Clear'#39
- ' OnClick = Clear1Click'
- ' end'
- ' object Font1: TMenuItem'
- ' Caption = '#39'&Font...'#39
- ' OnClick = Font1Click'
- ' end'
- ' object N2: TMenuItem'
- ' Caption = '#39'-'#39
- ' end'
- ' object StayOnTop1: TMenuItem'
- ' Caption = '#39'Stay On Top'#39
- ' OnClick = StayOnTop1Click'
- ' end'
- ' object N1: TMenuItem'
- ' Caption = '#39'-'#39
- ' end'
- ' object Exit1: TMenuItem'
- ' Caption = '#39'E&xit'#39
- ' OnClick = Exit1Click'
- ' end'
- ' end'
- ' end'
- ' object FontDialog1: TFontDialog'
- ' Font.Color = clWindowText'
- ' Font.Height = -13'
- ' Font.Name = '#39'System'#39
- ' Font.Style = []'
- ' MinFontSize = 0'
- ' MaxFontSize = 0'
- ' Left = 80'
- ' Top = 48'
- ' end'
- 'end')
- ParentFont = False
- ScrollBars = ssBoth
- TabOrder = 3
- WordWrap = False
- end
- object LoadTextBut: TButton
- Left = 15
- Top = 98
- Width = 89
- Height = 33
- Caption = '&Load Text'
- TabOrder = 0
- OnClick = LoadTextButClick
- end
- object FontBut: TButton
- Left = 119
- Top = 98
- Width = 89
- Height = 33
- Caption = '&Font'
- TabOrder = 1
- OnClick = FontButClick
- end
- object StartPageEdit: TMaskEdit
- Left = 296
- Top = 108
- Width = 33
- Height = 20
- EditMask = '0;1;_'
- MaxLength = 1
- TabOrder = 2
- Text = '1'
- end
- end
- end
- object PrinterSetupDialog1: TPrinterSetupDialog
- Left = 448
- Top = 48
- end
- object FontDialog1: TFontDialog
- Font.Color = clBlack
- Font.Height = -16
- Font.Name = 'Arial'
- Font.Style = []
- Device = fdPrinter
- MinFontSize = 0
- MaxFontSize = 0
- Left = 488
- Top = 48
- end
- object MainMenu1: TMainMenu
- Left = 416
- Top = 48
- object File1: TMenuItem
- Caption = '&File'
- object PrinterSetup1: TMenuItem
- Caption = 'Printer &Setup'
- OnClick = PrinterSetup1Click
- end
- object N1: TMenuItem
- Caption = '-'
- end
- object Exit1: TMenuItem
- Caption = 'E&xit'
- OnClick = Exit1Click
- end
- end
- end
- object PrintPreview2: TPrintPreview
- OnBeginPrint = PrintPreview2BeginPrint
- OnPrintPage = PrintPreview2PrintPage
- OnEndPrint = PrintPreview1EndPrint
- Title = 'Print Preview - Table Example'
- Left = 48
- Top = 226
- end
- object FontDialog2: TFontDialog
- Font.Color = clBlack
- Font.Height = -16
- Font.Name = 'Times New Roman'
- Font.Style = []
- Device = fdPrinter
- MinFontSize = 0
- MaxFontSize = 0
- Left = 520
- Top = 48
- end
- object PrintPreview1: TPrintPreview
- OnBeginPrint = PrintPreview1BeginPrint
- OnPrintPage = PrintPreview1PrintPage
- OnEndPrint = PrintPreview1EndPrint
- GridWidth = 10
- Title = 'Print Preview - Text Example'
- ShowGrid = True
- Left = 14
- Top = 226
- end
- object OpenDialog1: TOpenDialog
- DefaultExt = 'bmp'
- Filter = 'Bitmap Files (*.bmp)|*.bmp|All Files (*.*)|*.*'
- Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]
- Title = 'Open Bitmap'
- Left = 375
- Top = 275
- end
- object PrintPreview3: TPrintPreview
- OnBeginPrint = PrintPreview3BeginPrint
- OnPrintPage = PrintPreview3PrintPage
- OnEndPrint = PrintPreview1EndPrint
- GridColor = clPurple
- GridWidth = 5
- Title = 'Print Preview - Graphics'
- ShowGrid = True
- Left = 117
- Top = 226
- end
- object PrintPreview4: TPrintPreview
- OnBeginPrint = PrintPreview4BeginPrint
- OnPrintPage = PrintPreview4PrintPage
- OnEndPrint = PrintPreview1EndPrint
- Title = 'Print Preview'
- Left = 83
- Top = 226
- end
- object FontDialog3: TFontDialog
- Font.Color = clBlack
- Font.Height = -13
- Font.Name = 'Courier New'
- Font.Style = []
- Device = fdPrinter
- MinFontSize = 0
- MaxFontSize = 0
- Left = 407
- Top = 274
- end
- object OpenDialog2: TOpenDialog
- Filter = 'Text Files (*.txt)|*.txt|All Files (*.*)|*.*'
- Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]
- Title = 'Open a Text File'
- Left = 439
- Top = 274
- end
- end
-